package cn.cdeden.resource.controller;

import cn.cdeden.common.core.domain.R;
import cn.cdeden.resource.domain.SysOssEs;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
import org.dromara.easyes.starter.config.EasyEsConfigProperties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 是否开启elasticsearch
 * @ProjectName : KnowCore
 * @Package : cn.cdeden.resource.controller
 * @ClassName : SysEsConfigController
 * @Author : Yu.
 * @Description : // TODO
 * @Date : 2024/12/20 17:54
 * @Version : 1.0
 */
@Slf4j
@RestController
@RequestMapping("/es/config")
@RequiredArgsConstructor
public class SysEsConfigController {

    @Value("${easy-es.enable:false}")
    private Boolean enable; //ES是否开启配置


    @GetMapping("/get")
    public R search() {
        return R.ok(enable);
    }

}
